package com.alex.bootwar;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * 方式一：SpringBoot启动类扩展SpringBootServletInitializer，并重写configure方法
 * 方式二：在和SpringBoot同级的包下新建一个类扩展configure，并重写configure方法
 */
public class WarTestInitializer extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        // 注意这里要指向的是SpringBoot启动类
        return builder.sources(WarTestApplication.class);
    }
}
